var i = document.getElementsByClassName("fa-times")[0];
var div = document.getElementsByClassName("right")[0];
var div2 = document.getElementsByClassName("zud")[0];
var article = document.getElementsByTagName("article")[0];
var a = document.getElementsByClassName("dingbu")[0];
var li1 = document.getElementsByClassName("type")[0];
var li2 = document.getElementsByClassName("type")[1];
var li3 = document.getElementsByClassName("type")[2];
var hot = document.getElementsByClassName("hotwords")[0];
i.onclick = function() {
    div.style.display = 'none';
}
li1.onclick = function() {
    this.firstElementChild.style.backgroundColor = " #ff7500";
    this.style.borderRadius = 5 + "px" + " " + 5 + "px" + " " + 0 + " " + 0
    this.firstElementChild.style.color = "#fff";
    li2.style.backgroundColor = " #fff";
    li2.style.borderRadius = 0;
    li2.firstElementChild.style.color = "#ff4400";
    li3.style.backgroundColor = " #fff";
    li3.style.borderRadius = 0;
    li3.firstElementChild.style.color = "#ff4400";
    hot.style.display = "block"
}
li2.onclick = function() {
    this.style.backgroundColor = " #ff7500";
    this.style.borderRadius = 5 + "px" + " " + 5 + "px" + " " + 0 + " " + 0
    this.firstElementChild.style.color = "#fff";
    li1.firstElementChild.style.backgroundColor = " #fff";
    li1.style.borderRadius = 0;
    li1.firstElementChild.style.color = "#ff4400";
    li3.style.backgroundColor = " #fff";
    li3.style.borderRadius = 0;
    li3.firstElementChild.style.color = "#ff4400";
    hot.style.display = "none"
}
li3.onclick = function() {
    this.style.backgroundColor = " #ff7500";
    this.style.borderRadius = 5 + "px" + " " + 5 + "px" + " " + 0 + " " + 0
    this.firstElementChild.style.color = "#fff";
    li2.style.backgroundColor = " #fff";
    li2.style.borderRadius = 0;
    li2.firstElementChild.style.color = "#ff4400";
    li1.firstElementChild.style.backgroundColor = " #fff";
    li1.style.borderRadius = 0;
    li1.firstElementChild.style.color = "#ff4400";
    hot.style.display = "block"
}

setInterval(function() {

    if (window.pageYOffset >= 300) {
        div2.style.display = 'block';
        article.style.display = "block"
    } else {
        div2.style.display = 'none';
        article.style.display = "none"
    }

    // console.log(window.pageYOffset);
    // console.log(Y);
}, 100);

setInterval(function() {

    if (window.pageYOffset >= 800) {
        a.style.display = 'block';
        article.style.height = 353 + "px";
    } else {
        a.style.display = 'none';
        article.style.height = 313 + "px";
    }

    // console.log(window.pageYOffset);
    // console.log(Y);
}, 100)